﻿using UnityEngine;
using System.Collections.Generic;
using System;

public enum NotificationType
{
    /// 体力通知
    PhysicalStrength,
    /// 挂机收益
    DefensiveHangUp,
    /// 活动通知
    Activity,
    /// PVP赛季通知
    Pvp,
}

public class NotificationMgr : MonoBehaviour
{
    INotification notification;

    void Start()
    {
#if UNITY_IOS
        notification = new IOSNotificationMgr();     
#elif UNITY_ANDROID
        notification = new AndroidNotificationMgr();
#endif
        notification.ApplyNotificationCenter();
    }

    void OnApplicationPause(bool paused)
    {
        if (notification != null)
        {
            if (paused)
            {
               notification.SendNotification("Pause体力满了", "您的体力满了请尽快取关卡消耗吧", "icon_0", 5);
            }
            else
            {
                ///程序从后台进入前台时
                notification.StopAllNotification();
            }
        }
    }
}
